
<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="canonical" href="https://getbootstrap.com/docs/3.4/examples/dashboard/">

    <title>zzy-forum</title>

    <!-- Bootstrap core CSS -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/examples/dashboard/dashboard.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/assets/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">zzy_forum</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/getfriend">刷新</a></li>
            <!-- <li><a href="#">好友管理</a></li> -->
            <li><a href="/exit">退出</a></li>
            <li><a href="https://www.cnblogs.com/zzy3132820261">联系作者</a></li>
          </ul>
          <!-- <form class="navbar-form navbar-right">
            <input type="text" class="form-control" placeholder="搜索好友...">
          </form> -->
          <form class="navbar-form navbar-right" action="/selectBlogs" method="post">
            <div class="form-group">
              <input name="username" type="text" class="form-control" placeholder="搜索好友....">
            </div>
            <button type="submit" class="btn btn-default">搜索</button>
          </form>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-3 col-md-2 sidebar">
            <h2>好友列表</h2>
          <!-- <ul class="nav nav-sidebar">
            <li class="active"><a href="#">Overview <span class="sr-only">(current)</span></a></li>
            <li class="user">
                <a href="#" class="user">赵志勇</a> 
                <a href="#"><span class="glyphicon glyphicon-remove" title="删除" ></span></a>
            </li> -->
            <table class="table">
                <tr th:each="user:${users}">
                    <td><a href="#" class="user" th:text="${user.username}">赵志勇</a> </td>
                    <td><a th:href="@{/delfriend/}+${user.id}"><span class="glyphicon glyphicon-remove" title="删除" ></span></a></td>
                </tr>
              </table>
            
          </ul>
          
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">热门推荐</h1>

          <div class="row placeholders">

            <div class="col-xs-6 col-sm-3 placeholder" th:each="like:${userLike}">
              <img src="" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
              <a th:href="@{/friendblogs/}+${like.id}"><h4 th:text="${like.username}">Label</h4></a>
              <span class="text-muted">Something else</span>
            </div>

          </div>

          <h2 class="sub-header">好友文章</h2>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>标题</th>
                  <th>作者</th>
                  <th>创建时间</th>
                  <th>查看</th>
                  <th>点赞</th>
                </tr>
              </thead>
              <tbody>
                <tr th:each="blog:${blogs}">
                  <div th:each="b:${blog}">
                  <td th:text="${b.title}">url解析</td>
                  <td th:text="${b.userId}">zzy</td>
                  <td th:text="${#dates.format(b.createTime,'yyyy-MM-dd')}">2021-10-12</td>
                  <td><a th:href="@{/getdetail/}+${b.id}">详情</a></td>
                  <td><a th:href="@{/friendlike/}+${b.id}"><span th:text="${b.isLike}" class="glyphicon glyphicon-thumbs-up"></span></a></td>
                  </div>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
    <script>window.jQuery || document.write('<script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/assets/js/vendor/jquery.min.js"><\/script>')</script>
    <script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/dist/js/bootstrap.min.js"></script>
    <!-- Just to make our placeholder images work. Don't actually copy the next line! -->
    <script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/assets/js/vendor/holder.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.17/assets/js/ie10-viewport-bug-workaround.js"></script>
  </body>
</html>
